import request from '@/utils/request'
import { method } from 'lodash'
//获取图片
export const getImagesList = spuId=>request({url:`/admin/product/spuImageList/${spuId}`,method:'get'})
//获取销售属性
export const getSpuSaleAttrList = spuId=>request({url:`/admin/product/spuSaleAttrList/${spuId}`,method:"get"})
//获取品台属性的数据
export const getAttrInfoList = (category1Id,category2Id,category3Id)=>request({
  url:`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,
  method:'get'
})
//添加sku
export const reAddSku = skuInfo=>request({url:'/admin/product/saveSkuInfo',method:'post',data:skuInfo})
//获取sku数据的接口
export const reqFindSku = spuId =>request({url:`/admin/product/findBySpuId/${spuId}`,method:'get'})
//##################################SKU模块相关##########################################333333
export const reqGetSkuList = (page,limit)=>request({url:`/admin/product/list/${page}/${limit}`,method:'get'})
//上架
export const reqOnSale = skuId =>request({url:`/admin/product/onSale/${skuId}`,method:'get'})
//下架
export const reqDownSale = skuId =>request({url:`/admin/product/cancelSale/${skuId}`,method:'get'})
//获取sku详情
export const reqSkuById = skuId =>request({url:`/admin/product/getSkuById/${skuId}`,method:'get'})